package com.atguigu.common.exception;


public enum BizCodeEnum {
    VALID_EXCPETION(10001, "参数格式校验错误"),
    UNKNOWN_EXCEPTION(00000, "未知异常"),
    PRODUCT_UP_EXCEPTION(11111, "商品上架异常"),
    SMS_CODE_EXCEPTION(10002,"验证码发送频率过高,请稍后再试"),
    USER_EXIST_EXCEPTION(15001,"用户名已存在"),
    PHONE_CODE_EXCEPTION(15002,"手机号已存在"),
    USERNAME_PASSWORD_EXCEPTION(15003,"用户名或密码错误"),
    NO_STOCK_EXCEPTION(20001,"库存不足"),
    NO_ORDER_SN_EXCEPTION(21001,"订单号不存在")
    ;


    private int code;
    private String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
